package com.newear.marathon.utils;

public enum ApplicationError
{
    ADDITION_FAILED("添加失败", "100001"),
    MODIFY_FAILED("修改失败", "100002"),
    DELETE_FAILED("删除失败", "100003"),
    //---------web
    USER_NAME_ALREADY_EXIST("用户名已经存在", "200001"),
    ROLE_NAME_ALREADY_EXIST("角色名称已经存在", "200002"),
    USER_NAME_OR_PASSWORD_ERROR("用户名或密码有误", "200003"),
    CAPTCHA_ERROR("图形验证码有误", "200004"),
    OLD_PASSWORD_ERROR("原密码有误", "200005"),
    TWO_PASSWORD_ERROR("两次密码输入不一致", "200006"),
    USERID_STATUS_INVALID("无效的用户", "200007"),
    NOT_EXIST_PARENTID("父节点不存在", "200008"),
    NAME_SAME("同级资源名称不能重复", "200009"),
    LOGIN_USER_ERROR("获取不到用户信息", "200010"),
    NON_AUTHORITATIVE_INFORMATION("未授权，请联系管理员", "200011"),
    USER_NOT_UPDATE("不可用的用户不能更新", "200012"),
    ROLE_NOT_UPDATE("不可用的角色不能更新", "200013"),
    RESOURCE_NOT_UPDATE("不可用的资源不能更新", "200014"),
    ;
    private String message;
    private String code;

    ApplicationError(String message, String code) {
        this.message = message;
        this.code = code;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
